using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._AttributeRules
{
    /// <summary>
    /// <para>Import Attribute Rules</para>
    /// <para>Imports attribute rules from a comma-separated values (.csv) file to a dataset.</para>
    /// <para>将属性规则从逗号分隔值 （.csv） 文件导入数据集。</para>
    /// </summary>    
    [DisplayName("Import Attribute Rules")]
    public class ImportAttributeRules : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ImportAttributeRules()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_target_table">
        /// <para>Target Table</para>
        /// <para>The table or feature class to which the attribute rules will be applied. The dataset must have all the features specified in the rule definition.</para>
        /// <para>将应用属性规则的表或要素类。数据集必须具有规则定义中指定的所有要素。</para>
        /// </param>
        /// <param name="_csv_file">
        /// <para>Input File</para>
        /// <para>The .csv file containing the rules to import.</para>
        /// <para>包含要导入的规则的.csv文件。</para>
        /// </param>
        public ImportAttributeRules(object _target_table, object _csv_file)
        {
            this._target_table = _target_table;
            this._csv_file = _csv_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Import Attribute Rules";

        public override string CallName => "management.ImportAttributeRules";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_target_table, _csv_file, _out_table];

        /// <summary>
        /// <para>Target Table</para>
        /// <para>The table or feature class to which the attribute rules will be applied. The dataset must have all the features specified in the rule definition.</para>
        /// <para>将应用属性规则的表或要素类。数据集必须具有规则定义中指定的所有要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_table { get; set; }


        /// <summary>
        /// <para>Input File</para>
        /// <para>The .csv file containing the rules to import.</para>
        /// <para>包含要导入的规则的.csv文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _csv_file { get; set; }


        /// <summary>
        /// <para>Attribute Rules Imported</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Attribute Rules Imported")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public ImportAttributeRules SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}